A query execution plan (or “plan”) may be cached so that if the same query is executed, the cached plan can be used thus eliminating the often costly process of creating the plan. Determining whether to cache a plan for a query that contains a reference to a CURRENT_TIMESTAMP or TEMPORAL_TIMESTAMP is a challenge. For the purposes of this application, the term “query” should be interpreted broadly to include all kinds of “requests,” including database utilities.